#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 998244353;
inline int qpow(int x,int y)
{
	int res = 1;
	while(y)
	{
		if(y&1) res = res*x%mod;
		y>>=1;
		x = x*x%mod;
	}
	return res;
}
int n,m,q,k;
signed main()
{
	freopen("sequence.in","r",stdin);
	freopen("sequence.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin>>n>>m>>q>>k;
	if(m>n||m>q) return cout<<0,0;
	int tmp1 = 1,tmp2 = 1,ans = 0;
	for(int i = 0;i<=m;i++)
	{
		int now = tmp1*qpow(tmp2,mod-2)%mod*qpow(n-i,q)%mod;
//		cout<<"xx"<<now<<'\n';
		if(i&1) ans+=mod-now;
		else ans+=now;
		tmp1 = tmp1*(m-i)%mod;
		tmp2 = tmp2*(i+1)%mod;
	}
	ans%=mod;
	ans = ans*qpow(k,q-m)%mod*(n-m+1)%mod;
	cout<<ans;
	return 0;
}

